package com.mx.zb.md.tenant.utils;

/**
 * 
 * @author Administrator
 *
 */
public class AjaxResult {

	private static final String OK = "1";
	private static final String ERROR = "2";
	private static final String NOLOGIN = "3";

	private String status;
	private String message;
	private Object data;

	public AjaxResult success() {
		this.status = OK;
		return this;
	}

	public AjaxResult success(Object data) {
		this.status = OK;
		this.data = data;
		return this;
	}
	
	public AjaxResult noLogin() {
		this.status = NOLOGIN;
		return this;
	}

	public AjaxResult failure() {		
		return failure(null);
	}

	public AjaxResult failure(String message) {
		this.status = ERROR;
		this.message = message;
		return this;
	}
	

	public Object getData() {
		return data;
	}

	public String getStatus() {
		return status;
	}

	public String getMessage() {
		return message;
	}

	

}
